<?php include PATH_VIEWS . 'common/header.php'; ?>
<div class="main">
    <?php include PATH_VIEWS . 'common/left.php'; ?>
    <div class="main_right welcome_right" id="slide">
        <dl>
            <dt><h3>操作说明 <span>[关闭/展开]</span></h3></dt>
            <dd class="border">
                <span>以下红色边框的表单是必填项 。</span>
            </dd>
        </dl>
        <dl>
            <dt class="bottom">
            <h4>添加商品</h4>
            </dt>
            <dd>
                <form id="form1" name="form1" method="post" enctype="multipart/form-data" action="<?php echo URL; ?>">
                    <table class="system_envir from_demo"> 
                        <tr>
                            <td>上级分类菜单名称</td>
                            <td class="sanji">
                                <select name="FcateId" onchange="setSize(this.value)" >
                                    <option value="0">请选择广告菜单</option>
                                    <?php foreach ($menu_list as $ls) { ?>
                                        <option value="<?php echo $ls['Fid']; ?>" <?php echo($ls['Fid'] == $edit['FcateId']) ? "selected" : ''; ?> ><?php echo $ls['Fname']; ?></option>
                                    <?php } ?>
                                </select>
                            </td>
                            <td></td>
                        </tr>
                        <tr>
                            <td>广告位名称</td>
                            <td class="email"><input type="text" name="Fname" value="<?php echo $edit['Fname']; ?>" maxlength="16" style="width: 80%" data-rule="广告名称:required;length[4~16]" data-target="#tiShi"/></td>
                            <td id="tiShi">字符长度：4-16个</td>
                        </tr>
                        <tr>
                            <td>广告位编号</td>
                            <td class="email"><input type="text" name="Fnum" value="<?php echo $edit['Fnum']; ?>" maxlength="16" style="width: 30%" data-rule="广告编号:required;length[2~16]" data-target="#tiShiSub"/></td>
                            <td id="tiShiSub">该编号用于前台程序识别，建议程序员附助设置，仅允许字母或数字，字符长度：2-16个</td>
                        </tr>
                        <tr>
                            <td>广告位链接</td>
                            <td class="email"><input type="text"  name="Flink" value="<?php echo $edit['Flink']; ?>" maxlength="100" style="width: 80%" data-rule="required;length[10~100]" data-target="#tishiEn"/></td>
                            <td id="tishiEn">字符长度：10-100个</td>
                        </tr>
                        <tr>
                            <td>幻灯片背景色值</td>
                            <td><input type="text"  name="FbgColor" value="<?php echo $edit['FbgColor']; ?>" maxlength="6"/></td>
                            <td>幻灯片背景色值,此项只针对幻灯片</td>
                        </tr>
                        <tr>
                            <td>上传广告图片</td>
                            <td><input type="file" name="Fimg" style="width:auto"/></td>
                            <td class="tishi">请选择</td>
                        </tr>
                        <tr>
                            <td>广告图宽度</td>
                            <td><input type="text" name="Fwidth" value="<?php echo $edit['Fwidth']; ?>" maxlength="10" placeholder="px"/></td>
                            <td id="imgWidth" >如果没有图片，不用填写，字符长度：1-4个</td>
                        </tr>
                        <tr>
                            <td>广告图高度</td>
                            <td><input type="text" name="Fheight" value="<?php echo $edit['Fheight']; ?>" maxlength="10" placeholder="px"/></td>
                            <td id="imgHeight">如果没有图片，不用填写，字符长度：1-4个</td>
                        </tr>
                        <tr>
                            <td>排序</td>
                            <td><input type="text" id="sort" name="Fsort" value="<?php echo $edit['Fsort']; ?>" maxlength="5" data-rule="integer;length[1~99999]" data-target="#tiship"/></td>
                            <td id="tiship">数字越小排名越靠前</td>
                        </tr>
                        <tr>
                            <td>状态</td>
                            <td>
                                <select name="Fstatus" style="width: 80px" >
                                    <option value="1" <?php echo($edit['Fstatus']==1) ? "selected" : ''; ?> >生效</option>
                                    <option value="0" <?php echo($edit['Fstatus']==0) ? "selected" : ''; ?> >不生效</option>
                                </select>
                            </td>
                            <td class="tishi">状态生效前台则显示</td>
                        </tr>
                        <tr>
                            <td></td>
                            <td class="subbtn" colspan="2">
                                <input class="ok" type="submit" name="ok" value="确认提交">
                                <a href="javascript:void(0)" class="cancel" onclick="history.back()" >返回</a>
                            </td>
                        </tr>
                    </table>
                </form>
            </dd>
        </dl>
        <div id="test"></div>
    </div>
</div>
<?php include PATH_VIEWS . 'common/footer.php'; ?>